//WRITING

// write file in arc, with complete heder for file return 0 if all is good
int writeToArc ( FILE * arc, FILE * fileToRead, fileHead * fileHd);

// write string in file
void strWrite (FILE * fileToWrite,char * buf, size_t len, unsigned int * ChkNum);

// write integer in file
void intWrite (FILE * fileToWrite, unsigned long long int num, size_t size, unsigned int * ChkNum);

// Copy

/* copy information. Return 0 if all is good, Another if will some errors.*/
int copy (FILE* fileToRead,FILE * fileToWrite, unsigned long long int fileSize, unsigned int * ChkSum);

// make copy archieve with some changes
void copyArc (FILE * arc[],fileHead * list[]); 

// space useless space in archieve
void spaceJump (FILE * arc, fileHead * list); 

//Other
// function for cleaning files what was created in process
int clean_files (char * fileName,char * TMPfileName,int flag);

// get name of file without path to it
char * getName (char * strName); 

// 2nd function for extract file (main worker)
int extrFile (FILE * fileToWrite, const fileHead * list, FILE * arc);

// making header for file not for archieve
fileHead * _makeFileHead (char * fileName);

// convert string to integer
unsigned long long int strToInt (char * buf,size_t size);

// clearing before exit
void cl_exit (int function,int errorCode);

// calculate crc32 hasnum
uint_least32_t Crc32(const char * buf, size_t len);

// checking signature
int checkSign (FILE * arc);

// open 1 or 2 files - arc;
FILE ** openArc (char * arcName, char * arcnew);

void clean_tree (__HufTree * head);